<template>
  <div id="box">
    <el-button type="success" @click="back">返回</el-button>
    <div class="table">
        <el-row>
            <el-col :span="4">
              <ul class="list">
                <li>
                  <router-link to="/self/table" active-class="show">
                    修改个人信息
                  </router-link>
                </li>
                <li>
                  <router-link to="/self/table1" active-class="show">
                    我的发布
                  </router-link>
                </li>
                <li>
                  <router-link to="/self/table2" active-class="show">
                    我的评论
                  </router-link>
                </li>
                <li>
                  <router-link to="/self/table3" active-class="show">
                    回复我的
                  </router-link>
                </li>
                <li>
                  <router-link to="/self/table4" active-class="show">
                    私信
                  </router-link>
                </li>
              </ul>
            </el-col>
            <el-col :span="20">
              <transition name="ent" mode="out-in">
               <router-view></router-view>
              </transition>
            </el-col>
        </el-row>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    back () {
      this.$router.push('/home')
    }
  },
  data () {
    return {

    }
  }
}
</script>

<style lang="scss" scoped>
#box{
    width: 100%;
    height: 100vh;
    display: flex;
    background-image: url('@/assets/self.jpg');
    background-position: center;
    background-size: cover;
    position: relative;

    .table{
        position: relative;
        margin: auto;
        width: 62.5rem;
        height: 37.5rem;
        border-radius: 1.25rem;
        opacity: .8;
        background-color: aliceblue;
        .list{
          width: 100%;
          height: 100%;
          list-style: none;
          text-align: center;
          display: flex;
          flex-direction: column;
          li{
            line-height: 7.5rem;
          }

          a{
            text-decoration: none;
          }
        }

    }

}
      .ent-enter-active{
            animation:aaa  .8s;
        }

      .ent-leave-active{
          animation: aaa .8s reverse;
      }

      @keyframes aaa {
          0%{
              opacity: 0;
              transform: translateX(3.125rem);
          }
          100%{
              opacity: 1;
              transform: translateX(0px);
          }
      }

    .show{
      color: aqua;
    }

    .el-button{
      position: absolute;
      top:1.875rem;
      left:1.875rem;
    }
</style>
